package org.shangma.feign;

import org.shangma.common.Account;
import org.shangma.feign.fallback.AccountFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "seata-xa-account",fallback = AccountFeignClientFallback.class)
public interface AccountFeignClient {

//    @GetMapping("{id}")
//    public Account findById(@PathVariable("id") int id);

    @PutMapping("account")
    public void reduceMoney(@RequestParam("accountId") int accountId, @RequestParam("money") double money);

}
